using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Easy.Geo.Kml
{    
    public class Placemark : Feature
    {
        public Placemark() : base() { }
        public Placemark(string name) : base(name) { }
        public Placemark(string name, Coordinate coordinate)
            : this(name)
        {
            this._geometry = new Point(coordinate.ToString());
        }
        public Placemark(string name, Coordinate[] coordinates)
            : this(name)
        {            
            this._geometry = new LineString(coordinates);
        }
        public Placemark(string name, Geometry geometry)
            : this(name)
        {
            this._geometry = geometry;
        }
        public Placemark(string name, KBool visibility, KBool open) : base(name, visibility, open) { }
        public Placemark(string name, KBool visibility, KBool open, Geometry geometry)
            : this(name, visibility, open)
        {
            this._geometry = geometry;
        }
        public Placemark(string id, string name, string address, string description,
            string styleUrl, KBool visibility, ExtendedData extendedData, KBool open)
            :base(id,name,visibility,address,description,styleUrl,extendedData,open) { }
        private Geometry _geometry;
        [XmlElement(ElementName="Point",Type=typeof(Point))]
        [XmlElement(ElementName = "LineString", Type = typeof(LineString))]
        public Geometry Geometry
        {
            get { return _geometry; }
            set { _geometry = value; }
        }
    }
}
